Optimal. Leaf size=173 \[ -\frac {(b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt [3]{c}-2 \sqrt [3]{d} x}{\sqrt {3} \sqrt [3]{c}}\right )}{\sqrt {3} c^{2/3} d^{7/3}}-\frac {b x (b c-2 a d)}{d^2}+\frac {b^2 x^4}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 173, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {390, 200, 31, 634, 617, 204, 628} \[ -\frac {(b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt [3]{c}-2 \sqrt [3]{d} x}{\sqrt {3} \sqrt [3]{c}}\right )}{\sqrt {3} c^{2/3} d^{7/3}}-\frac {b x (b c-2 a d)}{d^2}+\frac {b^2 x^4}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 200
Rule 204
Rule 390
Rule 617
Rule 628
Rule 634
Rubi steps
\begin {align*} \int \frac {\left (a+b x^3\right )^2}{c+d x^3} \, dx &=\int \left (-\frac {b (b c-2 a d)}{d^2}+\frac {b^2 x^3}{d}+\frac {b^2 c^2-2 a b c d+a^2 d^2}{d^2 \left (c+d x^3\right )}\right ) \, dx\\ &=-\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}+\frac {(b c-a d)^2 \int \frac {1}{c+d x^3} \, dx}{d^2}\\ &=-\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}+\frac {(b c-a d)^2 \int \frac {1}{\sqrt [3]{c}+\sqrt [3]{d} x} \, dx}{3 c^{2/3} d^2}+\frac {(b c-a d)^2 \int \frac {2 \sqrt [3]{c}-\sqrt [3]{d} x}{c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2} \, dx}{3 c^{2/3} d^2}\\ &=-\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \int \frac {-\sqrt [3]{c} \sqrt [3]{d}+2 d^{2/3} x}{c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2} \, dx}{6 c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \int \frac {1}{c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2} \, dx}{2 \sqrt [3]{c} d^2}\\ &=-\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1-\frac {2 \sqrt [3]{d} x}{\sqrt [3]{c}}\right )}{c^{2/3} d^{7/3}}\\ &=-\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}-\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt [3]{c}-2 \sqrt [3]{d} x}{\sqrt {3} \sqrt [3]{c}}\right )}{\sqrt {3} c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{7/3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.14, size = 167, normalized size = 0.97 \[ \frac {-2 (b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )-12 b c^{2/3} \sqrt [3]{d} x (b c-2 a d)+4 (b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )+4 \sqrt {3} (b c-a d)^2 \tan ^{-1}\left (\frac {2 \sqrt [3]{d} x-\sqrt [3]{c}}{\sqrt {3} \sqrt [3]{c}}\right )+3 b^2 c^{2/3} d^{4/3} x^4}{12 c^{2/3} d^{7/3}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 505, normalized size = 2.92 \[ \left [\frac {3 \, b^{2} c^{2} d^{2} x^{4} + 6 \, \sqrt {\frac {1}{3}} {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2} + a^{2} c d^{3}\right )} \sqrt {-\frac {\left (c^{2} d\right )^{\frac {1}{3}}}{d}} \log \left (\frac {2 \, c d x^{3} - 3 \, \left (c^{2} d\right )^{\frac {1}{3}} c x - c^{2} + 3 \, \sqrt {\frac {1}{3}} {\left (2 \, c d x^{2} + \left (c^{2} d\right )^{\frac {2}{3}} x - \left (c^{2} d\right )^{\frac {1}{3}} c\right )} \sqrt {-\frac {\left (c^{2} d\right )^{\frac {1}{3}}}{d}}}{d x^{3} + c}\right ) - 2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \left (c^{2} d\right )^{\frac {2}{3}} \log \left (c d x^{2} - \left (c^{2} d\right )^{\frac {2}{3}} x + \left (c^{2} d\right )^{\frac {1}{3}} c\right ) + 4 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \left (c^{2} d\right )^{\frac {2}{3}} \log \left (c d x + \left (c^{2} d\right )^{\frac {2}{3}}\right ) - 12 \, {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2}\right )} x}{12 \, c^{2} d^{3}}, \frac {3 \, b^{2} c^{2} d^{2} x^{4} + 12 \, \sqrt {\frac {1}{3}} {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2} + a^{2} c d^{3}\right )} \sqrt {\frac {\left (c^{2} d\right )^{\frac {1}{3}}}{d}} \arctan \left (\frac {\sqrt {\frac {1}{3}} {\left (2 \, \left (c^{2} d\right )^{\frac {2}{3}} x - \left (c^{2} d\right )^{\frac {1}{3}} c\right )} \sqrt {\frac {\left (c^{2} d\right )^{\frac {1}{3}}}{d}}}{c^{2}}\right ) - 2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \left (c^{2} d\right )^{\frac {2}{3}} \log \left (c d x^{2} - \left (c^{2} d\right )^{\frac {2}{3}} x + \left (c^{2} d\right )^{\frac {1}{3}} c\right ) + 4 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \left (c^{2} d\right )^{\frac {2}{3}} \log \left (c d x + \left (c^{2} d\right )^{\frac {2}{3}}\right ) - 12 \, {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2}\right )} x}{12 \, c^{2} d^{3}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 211, normalized size = 1.22 \[ -\frac {\sqrt {3} {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {\sqrt {3} {\left (2 \, x + \left (-\frac {c}{d}\right )^{\frac {1}{3}}\right )}}{3 \, \left (-\frac {c}{d}\right )^{\frac {1}{3}}}\right )}{3 \, \left (-c d^{2}\right )^{\frac {2}{3}} d} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (x^{2} + x \left (-\frac {c}{d}\right )^{\frac {1}{3}} + \left (-\frac {c}{d}\right )^{\frac {2}{3}}\right )}{6 \, \left (-c d^{2}\right )^{\frac {2}{3}} d} - \frac {{\left (b^{2} c^{2} d^{2} - 2 \, a b c d^{3} + a^{2} d^{4}\right )} \left (-\frac {c}{d}\right )^{\frac {1}{3}} \log \left ({\left | x - \left (-\frac {c}{d}\right )^{\frac {1}{3}} \right |}\right )}{3 \, c d^{4}} + \frac {b^{2} d^{3} x^{4} - 4 \, b^{2} c d^{2} x + 8 \, a b d^{3} x}{4 \, d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.05, size = 334, normalized size = 1.93 \[ \frac {b^{2} x^{4}}{4 d}+\frac {\sqrt {3}\, a^{2} \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 x}{\left (\frac {c}{d}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 \left (\frac {c}{d}\right )^{\frac {2}{3}} d}+\frac {a^{2} \ln \left (x +\left (\frac {c}{d}\right )^{\frac {1}{3}}\right )}{3 \left (\frac {c}{d}\right )^{\frac {2}{3}} d}-\frac {a^{2} \ln \left (x^{2}-\left (\frac {c}{d}\right )^{\frac {1}{3}} x +\left (\frac {c}{d}\right )^{\frac {2}{3}}\right )}{6 \left (\frac {c}{d}\right )^{\frac {2}{3}} d}-\frac {2 \sqrt {3}\, a b c \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 x}{\left (\frac {c}{d}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 \left (\frac {c}{d}\right )^{\frac {2}{3}} d^{2}}-\frac {2 a b c \ln \left (x +\left (\frac {c}{d}\right )^{\frac {1}{3}}\right )}{3 \left (\frac {c}{d}\right )^{\frac {2}{3}} d^{2}}+\frac {a b c \ln \left (x^{2}-\left (\frac {c}{d}\right )^{\frac {1}{3}} x +\left (\frac {c}{d}\right )^{\frac {2}{3}}\right )}{3 \left (\frac {c}{d}\right )^{\frac {2}{3}} d^{2}}+\frac {2 a b x}{d}+\frac {\sqrt {3}\, b^{2} c^{2} \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 x}{\left (\frac {c}{d}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 \left (\frac {c}{d}\right )^{\frac {2}{3}} d^{3}}+\frac {b^{2} c^{2} \ln \left (x +\left (\frac {c}{d}\right )^{\frac {1}{3}}\right )}{3 \left (\frac {c}{d}\right )^{\frac {2}{3}} d^{3}}-\frac {b^{2} c^{2} \ln \left (x^{2}-\left (\frac {c}{d}\right )^{\frac {1}{3}} x +\left (\frac {c}{d}\right )^{\frac {2}{3}}\right )}{6 \left (\frac {c}{d}\right )^{\frac {2}{3}} d^{3}}-\frac {b^{2} c x}{d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.23, size = 189, normalized size = 1.09 \[ \frac {b^{2} d x^{4} - 4 \, {\left (b^{2} c - 2 \, a b d\right )} x}{4 \, d^{2}} + \frac {\sqrt {3} {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {\sqrt {3} {\left (2 \, x - \left (\frac {c}{d}\right )^{\frac {1}{3}}\right )}}{3 \, \left (\frac {c}{d}\right )^{\frac {1}{3}}}\right )}{3 \, d^{3} \left (\frac {c}{d}\right )^{\frac {2}{3}}} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (x^{2} - x \left (\frac {c}{d}\right )^{\frac {1}{3}} + \left (\frac {c}{d}\right )^{\frac {2}{3}}\right )}{6 \, d^{3} \left (\frac {c}{d}\right )^{\frac {2}{3}}} + \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (x + \left (\frac {c}{d}\right )^{\frac {1}{3}}\right )}{3 \, d^{3} \left (\frac {c}{d}\right )^{\frac {2}{3}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.39, size = 152, normalized size = 0.88 \[ \frac {b^2\,x^4}{4\,d}-x\,\left (\frac {b^2\,c}{d^2}-\frac {2\,a\,b}{d}\right )+\frac {\ln \left (d^{1/3}\,x+c^{1/3}\right )\,{\left (a\,d-b\,c\right )}^2}{3\,c^{2/3}\,d^{7/3}}+\frac {\ln \left (2\,d^{1/3}\,x-c^{1/3}+\sqrt {3}\,c^{1/3}\,1{}\mathrm {i}\right )\,\left (-\frac {1}{6}+\frac {\sqrt {3}\,1{}\mathrm {i}}{6}\right )\,{\left (a\,d-b\,c\right )}^2}{c^{2/3}\,d^{7/3}}-\frac {\ln \left (c^{1/3}-2\,d^{1/3}\,x+\sqrt {3}\,c^{1/3}\,1{}\mathrm {i}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,{\left (a\,d-b\,c\right )}^2}{3\,c^{2/3}\,d^{7/3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.68, size = 156, normalized size = 0.90 \[ \frac {b^{2} x^{4}}{4 d} + x \left (\frac {2 a b}{d} - \frac {b^{2} c}{d^{2}}\right ) + \operatorname {RootSum} {\left (27 t^{3} c^{2} d^{7} - a^{6} d^{6} + 6 a^{5} b c d^{5} - 15 a^{4} b^{2} c^{2} d^{4} + 20 a^{3} b^{3} c^{3} d^{3} - 15 a^{2} b^{4} c^{4} d^{2} + 6 a b^{5} c^{5} d - b^{6} c^{6}, \left (t \mapsto t \log {\left (\frac {3 t c d^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )} \right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________